
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@embroider/addon-shim
Advanced tools
Makes a v2 addon work like a v1 addon so it can be used in a classic (non-Embroider) app.
This allows addons to update to v2 without waiting for all their users to upgrade to Embroider.
ember install @embroider/addon-shim
To use it:
Be prepared to do a semver major release of your addon, because the shim demands that the app has ember-auto-import >= 2.
Create an addon-main.js
file that requires and invokes the shim:
const { addonV1Shim } = require('@embroider/addon-shim');
module.exports = addonV1Shim(__dirname);
Update your package.json
to point at addon-main.js:
{
"ember-addon": {
"version": 2,
"type": "addon",
"main": "addon-main.js"
}
}
disabled: this optional argument lets you control whether your shimmed addon will emit 'app-js'
and 'public-assets'
into non-embroider builds. Example:
module.exports = addonV1Shim(__dirname, {
disabled(options) {
let welcomeConfig = options['ember-welcome-page'] || {};
return process.env.EMBER_ENV === 'production' && !welcomeConfig.enabled;
},
});
This option only works in non-embroider builds. Under embroider, apps just won't import the parts of your addon they don't want.
See the top-level CONTRIBUTING.md in this monorepo.
This project is licensed under the MIT License.
@embroider/util
1.9.0 -> 1.10.0
FAQs
Make v2 addons work in non-Embroider apps.
The npm package @embroider/addon-shim receives a total of 121,676 weekly downloads. As such, @embroider/addon-shim popularity was classified as popular.
We found that @embroider/addon-shim demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.